SpatialStream® Code Examples

Points of Interest Identify

Using Points of Interest (POI) Data, GetQuery and GetMap SpatialStream® components you can display Points of Interest in your mapping application and use GetQuery to provide identify functionality. This example will demonstrate how to display the POI data and add identify behavior with information about the subject POI returned in a balloon.

SLD | Map Composition File | GetMap

layer = new Dmp.Layer.WmsLayer("POI", "SS");
layer.addChild("point", "SS.Admin.TT.POI/POI", "PUBLIC_FOLDER/Styles/POI/RREBLACK.sld.xml", {
filter:"SERVICEGROUP in ('Business')", zIndex: 100, zoomRange: {
min: 4, max: 19
}
});
map.addEntity(layer);

//----------------

var url = "getQuery.aspx" +
"?returnGeoType=1" +
"&dataSource=SS.Admin.TT.POI/POI" +
"&inclusionGeometries=POINT(" + loc.longitude + " " + loc.latitude + ")" +
"&geoBufferUint=4" +
"&geoBufferDist=" + getTolerance() +
"&showSchema=false";

var filter = getFilter();

if (filter.length > 0) {

url += "&query=" + encodeURIComponent(filter);
}

Dmp.Env.Connections["SS"].getJson(url, successCallback, errorCallback);


Run Sample   Back To Index